Add assertion for hash values of rows.
authorEli Zaretskii <eliz@gnu.org>
Fri, 18 Nov 2011 12:41:36 +0000 (14:41 +0200)
committerEli Zaretskii <eliz@gnu.org>
Fri, 18 Nov 2011 12:41:36 +0000 (14:41 +0200)
 src/dispnew.c (add_row_entry): Add xassert to verify that ROW's hash code
 is valid.

src/ChangeLog
src/dispnew.c

index 02be33fb90618fd50c831100801f8fe184b23819..1897c86654ed6cd770188758885ba6d06babb712 100644 (file)
@@ -4,6 +4,7 @@
        hash values of the two rows.
        (copy_row_except_pointers): Preserve the used[] arrays and the
        hash values of the two rows.  (Bug#10035)
+       (add_row_entry): Add xassert to verify that ROW's hash code is valid.
 
        * xdisp.c (row_hash): New function, body extracted from
        compute_line_metrics.
index 07843d3e2141f59881bd6d778b6b45ae87aa85b9..d6bf6666ee20e2d93016bf5f8bb33eaac85bce3c 100644 (file)
@@ -4240,6 +4240,7 @@ add_row_entry (struct glyph_row *row)
   ptrdiff_t i = row->hash % row_table_size;
 
   entry = row_table[i];
+  xassert (entry || verify_row_hash (row));
   while (entry && !row_equal_p (entry->row, row, 1))
     entry = entry->next;